package interfaces;

import java.util.ArrayList;
import control.*;


/**
 * Order DataBase, which generates the Orders
 * @author iii
 */
public class OrderDB {

    //Lists of Customers and Bar Types
    private static ArrayList<String> customers = new ArrayList<String>();
    private static ArrayList<String> barTypes = new ArrayList<String>();
    static int orderNr = 0;

    /**
     * Creates the Lists of Customers and Bar Types
     * @param ArrayList<String> cust
     * @param ArrayList<String> bTypes
     */
    public static void init(ArrayList<String> cust, ArrayList<String> bTypes)
    {
        setBarTypes(bTypes);
        setCustomers(cust);
    }

    /**
     * Generates an Order within the System with an additional OrderNumber
     * @param String barType
     * @param int numOfBars
     * @param StringcustomerNr
     * @param int time
     */
    public static void generateOrders(String barType, int numOfBars, String customerNr, int time)
    {
        orderNr++;

        Order.createOrder(Integer.toString(orderNr), barType, numOfBars, customerNr, time);
    }

    /**
     * @return the customers
     */
    public static ArrayList<String> getCustomers() {
        return customers;
    }

    /**
     * @param aCustomers the customers to set
     */
    public static void setCustomers(ArrayList<String> aCustomers) {
        customers = aCustomers;
    }

    /**
     * @return the barTypes
     */
    public static ArrayList<String> getBarTypes() {
        return barTypes;
    }

    /**
     * @param aBarTypes the barTypes to set
     */
    public static void setBarTypes(ArrayList<String> aBarTypes) {
        barTypes = aBarTypes;
    }
    
}

